/**
 * Copyright(c) 2010 Ceno Techonologies Co., Ltd.
 *
 * History:
 *   15-8-24 上午10:58 Created by lyyang
 */
package com.jade.bss.base.blacklist;

import java.util.List;
import javax.ejb.TransactionAttribute;

import com.jade.framework.base.criterion.Criteria;
import com.jade.framework.base.util.PagingList;
import org.springframework.transaction.annotation.Transactional;

/**
 * 黑名单管理器
 *
 * @author <a href="mailto:lyyang@ceno.cn">lyyang</a>
 * @version 1.0 15-8-24 上午10:58
 */
public interface BlackListManager
{

    long add(BlackList blackList);


    void update(BlackList blackList);


    void remove(BlackList blackList);


    void remove(long... ids);

    BlackList get(long id);

    PagingList<BlackList> query(Criteria criteria);

    List<BlackList> list(Criteria criteria);

    @TransactionAttribute
    @Transactional (rollbackFor = Throwable.class)
    void remove(String ownerType, String ownerId, String blackType, String blackId);

    BlackList get(String ownerType, String ownerId, String blackType, String blackId);

    boolean inBlackList(String ownerType, String ownerId, String blackType, String blackId);
}
